import request from '@/utils/request'
let api = process.env.VUE_APP_PREFIX
// 查询顶层节点
export function getTopNode (params = { view: '' }) {
  return request({
    method: 'get',
    url: `${api}/tree.do`,
    params
  })
}
// 查询子节点
export function findNextNode (params = {id: '', view: ''}) {
  return request({
    method: 'get',
    url: `${api}/tree.do`,
    params
  })
}
// 查询bom基本信息
export function findBomInfo (params = {id: ''}) {
  return request({
    method: 'get',
    url: `${api}/getBomInfo`,
    params
  })
}

// 查询有效性
export function findEffective (params = {id: ''}) {
  return request({
    method: 'get',
    url: `${api}/getEffectiveness`,
    params
  })
}
// 查询bom部件cad文档
export function findCadInfo (params = {id: ''}) {
  return request({
    method: 'get',
    url: `${api}/getCADInfo`,
    params
  })
}
// 查询bom部件小版本
export function findSmallVersion (params = {id: ''}) {
  return request({
    method: 'get',
    url: `${api}/getBomSmallVersion`,
    params
  })
}
// 查询bom部件修订版本
export function findModifiedVersion (params = {id: ''}) {
  return request({
    method: 'get',
    url: `${api}/getModifiedInfo`,
    params
  })
}
// 查询bom部件使用情况
export function findUsesNode (params = {id: ''}) {
  return request({
    method: 'get',
    url: `${api}/getUsesPart`,
    params
  })
}
// 查询bom部件文档
export function findBomFile (params = {id: ''}) {
  return request({
    method: 'get',
    url: `${api}/getBomFileInfo`,
    params
  })
}
// 查询bom部件ECP
export function findEcp (params = {id: ''}) {
  return request({
    method: 'get',
    url: `${api}/getEcpInfo`,
    params
  })
}
// 查询bom部件搜寻结果
export function findSearchPart (params = {id: ''}) {
  return request({
    method: 'get',
    url: `${api}/getSearchPart`,
    params
  })
}
// 查询bom部件签审信息
export function findSignature (params = {id: ''}) {
  return request({
    method: 'get',
    url: `${api}/getSignature`,
    params
  })
}
// 查询bom部件的sdm信息
export function findSDMInfo (params = {id: ''}) {
  return request({
    method: 'get',
    url: `${api}/getSDMData`,
    params
  })
}
